#ifndef EVENTSEXAMPLE_H
#define EVENTSEXAMPLE_H

#include <libsyncpluginmgr/ClientPlugin.h>
#include <libsyncprofile/SyncResults.h>

class EventsExample : public Buteo::ClientPlugin
{
    Q_OBJECT
public:
    EventsExample( const QString& aPluginName,
                   const Buteo::SyncProfile& aProfile,
                   Buteo::PluginCbInterface *aCbInterface );

    virtual ~EventsExample();
    virtual bool init();
    virtual bool uninit();
    virtual bool startSync();
    virtual void abortSync(Sync::SyncStatus aStatus = Sync::SYNC_ABORTED);
    virtual Buteo::SyncResults getSyncResults() const;
    virtual bool cleanUp();
public slots:
    virtual void connectivityStateChanged( Sync::ConnectivityType aType,
                                          bool aState );

protected slots:
    void syncSuccess();
    void syncFailed();
    void updateFeed();
private:
    void updateResults(const Buteo::SyncResults &aResults);

private:
    QMap<QString, QString>      iProperties;
    Buteo::SyncResults          iResults;
};

extern "C" EventsExample* createPlugin( const QString& aPluginName,
                                       const Buteo::SyncProfile& aProfile,
                                       Buteo::PluginCbInterface *aCbInterface );

extern "C" void destroyPlugin( EventsExample *aClient );

#endif  //  EVENTSEXAMPLE_H
